{% extends "layout.html" %}

{% block content %}
<div class="card">
    <div class="card-header">会员登录</div>
    <div class="card-body">
        <form id="form-data">
            <div class="form-group">
                <label>账号</label>
                {% raw xsrf_form_html() %}
                <input type="text"
                       class="form-control form-width"
                       name="name"
                       placeholder="请输入账号！">
                <p class="text-danger" id="error_name"></p>
            </div>
            <div class="form-group">
                <label>密码</label>
                <input type="password"
                       class="form-control form-width"
                       name="pwd"
                       placeholder="请输入密码！">
                <p class="text-danger" id="error_pwd"></p>
            </div>
            <div class="form-group">
                <a href="javascript:void(0);" id="btn-sub" class="btn btn-primary">登录</a>
            </div>
        </form>
    </div>
</div>
{% end %}

{% block foot %}
<script>
    $(document).ready(function () {
        request('/login/', '/', ['name', 'pwd'], "登录成功！");
    });
</script>
{% end %}